package com.gem.back.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gem.back.entity.AoaUser;
import com.gem.back.mapper.AoaUserMapper;
import com.gem.back.service.IAoaUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author hhhy
 * @since 2020-02-22
 */
@Service
public class AoaUserServiceImpl extends ServiceImpl<AoaUserMapper, AoaUser> implements IAoaUserService {
    @Autowired
    private AoaUserMapper aoaUserMapper;

    @Override
    public AoaUser findUserByName(String userName) {
        return aoaUserMapper.findUserByName(userName);
    }

    @Override
    public List<AoaUser> findUserByFatherId(Integer fatherId) {
        return aoaUserMapper.findUserByFatherId(fatherId);
    }

    @Override
    public AoaUser findUserByUserId(Integer userId) {
        return aoaUserMapper.findUserByUserId(userId);
    }

    @Override
    public List<AoaUser> findUserAndPosititonByDeptId(Integer deptId) {
        return aoaUserMapper.findUserAndPosition(deptId);
    }
}
